import http from "@/utils/request";

export default {
  // 设备列表
  get_cabinets(data) {
    return http({
      method: "post",
      data: {
        func: "get_cabinets",
        ...data,
      },
    });
  },
  // 设备---升级
  cabinet_update(data) {
    return http({
      method: "post",
      data: {
        func: "cabinet_update",
        business: data,
      },
    });
  },

  // 设备--仓位
  get_cabinet_box(data) {
    return http({
      method: "post",
      data: {
        func: "get_cabinet_box",
        business: data,
      },
    });
  },
  // 仓位---开门
  box_open(data) {
    return http({
      method: "post",
      data: {
        func: "box_open",
        business: data,
      },
    });
  },
  // 仓位---充电
  start_charge(data) {
    return http({
      method: "post",
      data: {
        func: "start_charge",
        business: data,
      },
    });
  },
  // 仓位---停充
  stop_charge(data) {
    return http({
      method: "post",
      data: {
        func: "stop_charge",
        business: data,
      },
    });
  },

  // 升级订单记录--进行中
  get_upgrading(data) {
    return http({
      method: "post",
      data: {
        func: "get_upgrading",
        business: data,
      },
    });
  },
  // 升级订单记录--已完成
  get_upgrade_success(data) {
    return http({
      method: "post",
      data: {
        func: "get_upgrade_success",
        business: data,
      },
    });
  },
};
